ge DSnew=APDS

replace DSnew=0 if statenm=="Karnataka"&year<1988
replace DSnew=0 if year<1982
replace DSnew=-1 if statenm=="Tamil Nadu"

ge APnew=APcode

replace APnew=0 if statenm=="Andhra Pradesh"&year<1987
replace APnew=0 if statenm=="Karnataka"&year<1987
replace APnew=0 if statenm=="Madhya Pradesh"&year<1983
replace APnew=0 if statenm=="Maharashtra"&year<1981
replace APnew=0 if statenm=="Orissa"&year<1983
replace APnew=0 if statenm=="Rajasthan"&year<1984

ge DSproenew=(DSnew<0)
ge DSprownew=(DSnew>0)

ge APprownew=(APnew<0)

ge bhattnproe=proe
ge bhattnprow=prow

replace bhattnproe=0 if statenm=="Madhya Pradesh"
replace bhattnprow=o if statenm=="Maharashtra"&year<1983
replace bhattnprow=0 if statenm=="Orissa"
